package com.server.mongodb.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;

/**
 * 基本用户信息
 */
@Data
@Document("user")
public class MGUser {
    @Id
    private Long uid; // 用户uid
    private String name; // 昵称
    private String password; // 密码
    private String headImage; // 头像
    List<Long> friendUid; // 好友id列表
    List<Long> groupUid; // 群id列表
    boolean exist; // 用户账号是否正常使用(如果注销或异常则为false)

    public MGUser(Long uid, String name, String password, String headImage, List<Long> friendUid, List<Long> groupUid, boolean exist) {
        this.uid = uid;
        this.name = name;
        this.password = password;
        this.headImage = headImage;
        this.friendUid = friendUid;
        this.groupUid = groupUid;
        this.exist = exist;
    }
}
